// pages/detail/detail.js
Page({
  data: {
  id:'',
  status:'',
  now:'',
  price:'12.00',
  adress: { name: '王洪强', tel: '13594807017', info:'重庆市重庆辖区巴南区 鱼洞上城时代11栋11-3'},  
  bill: [{src: '../img/pro.jpg', name: '刘员外老火锅现炸酥肉一份', price: '19.00', num: '1' }],
  store:'店铺1'

  },
  return:function(){
    var id=this.data.id;
    wx.navigateTo({
      url: '../return/return?id='+id,
    })
  },
  road:function(){
   wx.navigateTo({
     url: '../pro/pro?id='+this.data.id
   })
  },
  shop: function () {
    wx.navigateTo({
      url: '../shop/shop?id=' + this.data.id
    })
  },
  pay: function () {
    var id = this.data.id;
    wx.navigateTo({
      url: '../pay/pay?id=' + id,
    })
  },
  sure: function () {
    var id = this.data.id;
    var that=this;
    wx.showModal({
      title: '提示',
      content: '确定要确认订单吗？',
      success: function (sm) {
        if (sm.confirm) {
            wx.showToast({
              title: '确认成功',
            })
            that.setData({now:3})
        } else if (sm.cancel) {
        }
      }
    })
  },
  onLoad: function (options) {
    this.setData({
      id: options.id,
      status: options.status,
      now: options.now
    })
  },
  onReady: function () {
  
  }
})